#ifndef Delegate3_H
#define Delegate3_H

#include "Global_Signal.h"
#include "abstractDelegate.h"

template <class T, class U, class V, class W>
class Delegate3 : public AbstractDelegate{
    public :

    Delegate3(int (T::*aPDelegate)(U,V,W), T * ref);

    T *     objetDelegate;
    int     (T::*pDelegate)(U, V, W);

    virtual void Run();

    template<class T>
     virtual  void Run(T arg)=0;

    template<class T, class U>
     virtual  void Run(T arg, U arg2)=0;

    template<class T, class U, class W>
     virtual  void Run(T arg, U arg2, W arg3)=0;
};


template <class T, class U, class V, class W>
Delegate3<T,U,V,W>::Delegate3(int (T::*apDelegate)(U,V,W),T * ref){
    pDelegate=apDelegate;
    objetDelegate=ref;
}


template<class T, class U, class V, class W>
void Delegate3<T,U,V,W>::Run(U arg1, V arg2, W arg3){
    (objetDelegate->*pDelegate)(arg1,arg2,arg3);
}

#endif // Delegate3_H
